<?php
require_once("global.php");
$id = isset($_GET['id'])?$_GET['id']:0;
$sql = "SELECT * FROM ".$prefix."upfiles where id = ".$id;
$file = $DB->qgGetAll($sql,true);

if(file_exists($file[0]['folder'].$file[0]['filename']))
{
	echo '<img src="'.$file[0]['folder'].$file[0]['filename'].'" />';
}
else
{
	qgheader();
}
?>